package github.saw96x.common.exception;

import github.saw96x.common.enums.RpcErrorMessageEnum;

/**
 * @author Saw96x
 * @date 2022/3/18 8:24
 */
public class RpcException extends RuntimeException {
  public RpcException(RpcErrorMessageEnum rpcErrorMessageEnum, String detail) {
    super(rpcErrorMessageEnum.getMessage() + ":" + detail);
  }

  public RpcException(String message, Throwable cause) {
    super(message, cause);
  }

  public RpcException(RpcErrorMessageEnum rpcErrorMessageEnum) {
    super(rpcErrorMessageEnum.getMessage());
  }
}
